import { defineStore } from "pinia";

export const useLayoutStore = defineStore("layout", () => {
  const tl = ref<gsap.core.Timeline>();
  const drawer = ref<boolean>(true);
  function drawerOpen() {
    drawer.value = !drawer.value;
    if (drawer.value) {
      tl.value?.restart();
    }
  }

  return { tl, drawer, drawerOpen };
});
